-
Notifications
You must be signed in to change notification settings - Fork 13.3k
add applicability to span_suggestion call #54412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than fixing the import, r=me
@@ -22,6 +22,7 @@ use std::collections::VecDeque; | |||
use std::fmt; | |||
use syntax::symbol::keywords; | |||
use syntax_pos::Span; | |||
use errors::Applicability; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to be use syntax::errors::Applicability
.
span, | ||
&format!( | ||
"to allow this impl Trait to capture borrowed data with lifetime \ | ||
`{}`, add `{}` as a constraint", | ||
fr_name, suggestable_fr_name, | ||
), | ||
format!("{} + {}", snippet, suggestable_fr_name), | ||
Applicability::MachineApplicable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel it might be safer to use MaybeIncorrect
here, but this might be fine in the wild. Lets keep it this way and fix it if we find positive proof that it is a problem.
d2cab27
to
7f9a259
Compare
@bors r+ rollup |
📌 Commit 7f9a259 has been approved by |
Found another
span_suggestion
call. Issue #50723r? @estebank